<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<base href="<%=basePath%>">
<title>订单</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
h1 {
	clear: both;
	margin-left: 460px;
}

table {
	margin: 0px auto;
	width: 1024px;
}

table img {
	width: 100px;
	height: 100px;
	vertical-align: middle;
}

td {
	text-align: center;
}

th {
	line-height: 50px;
	background-color: #A52A2A;
	color: white;
}

#empty {
	margin: 0px 0px 0px 20%;
}

#submit {
	width: 100px;
	height: 40px;
	background-color: #A52A2A;
	border: 0px;
	color: white;
}
;
</style>
<script type="text/javascript" src="${request.Context}/js/jquery-1.8.3.js"></script>
<script type="text/javascript">
	$(document).ready(function(e) {
		$(".del").click(function() {
			return confirm("确定要删除吗？");
		});

	});
</script>
</head>
<body>

<h1>所有订单</h1>
<hr>                
		<#if gwgoods??>
		<form action="/gw/add" method="post">
			<table>
				<tr>
					<th>商品编号</th>
					<th colspan="2">商品名称</th>
					<th>商品单价</th>
					<th>购买数量</th>
					<th>小计</th>
					<th>下单时间</th>
					<th>订单状态</th>
					<th>订单操作</th>				
				</tr>
				
				<#list gwgoods as cart>
					<tr class="td">
						<td>${cart.getGid()}</td>
						<td><img src="${request.Context}/img/detail/${cart.getImg()}" /></td>
						<td>${cart.getName()}</td>
						<#--<td>${cart.getType()}</td>-->
						<td>${cart.getPrice()}</td>
						<td>${cart.getNum()}</td>
						<td>${cart.getPrice()*cart.getNum()}</td>	
						<td>${cart.getDateTime()}</td>
						<#--  <td>${cart.getZt()}</td>-->
						<td>
						<#if cart.zt == 1>已发货</#if> 
						<#if cart.zt  == 0>未发货</#if>
						<#if cart.zt == 2>已确认收货</#if>
						</td>
						<td>
						<#if cart.zt = 0>
						<a href="updatedd?id=${cart.id}&zt=1">发货</a>
						</#if> 
						</td>																		
					</tr>
				</#list>
			</table>
		<#else>
		
			
			<div id="empty">
				<a href="/" ><img src="${request.Context}/img/che.jpg"></a>
			</div>
		</#if>
		
	</form>
	<div style="height: 190px"></div>
<#include "footer.ftl">
</body>
